<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html;charset=utf-8" pageEncoding="utf-8"
	language="java"%>
<%@ include file="/jsp/platform/include/include.jsp"%>
<html>
<head>
<TITLE><c:out value="${_LOGONUSER_.MANAGETITILE}" /></TITLE>
<META http-equiv="Content-Type" content="text/html; charset=utf-8">
	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
	<%@ include file="/jsp/platform/include/header.jsp"%>

	<script type="text/javascript">
	    $(document).ready(function() {
			//开户行
	        <common:getDicListByKey key="2100" var="depositBankList"/>
			//$("#depositBank").val("<c:out value='${model.settleCardInfoModel.depositBank}'/>");
		})
		//设置角色菜单关联
		    function singleSettleApplyTaskAdd() {
		        var checkStr =   "need|bankUsrname|开户名称|"+ $("#bankUsrname").val()+";"
		                        +"need|bankAccount|开户银行账号|"+ $("#bankAccount").val()+";"
		                        +"need|depositBank|开户银行所在地|"+ $("#depositBank").val()+";"
		                        +"need|depositBankBranch|开户银行支行|"+ $("#depositBankBranch").val()+";"
		                        +"need|transAmt|入账金额|"+ $("#transAmt").val()+";"
		                        +"double|transAmt|入账金额|"+ $("#transAmt").val()+";"
		                         ;
		        //检验所有规则
				if (!checkAll(checkStr)) {
					return false;
				}
			    $.messager.confirm("操作提示", "您确定要执行此操作吗！", function (data) {
			           if(data){
			                 var privateTypeStr = $("input[name^='privateType']");
			                 var privateType = "";
			                 for(i=0;i<privateTypeStr.length;i++){
			                    var isOrNotChecked = privateTypeStr[i].checked;
			                    if(isOrNotChecked){
			                       privateType = privateTypeStr[i].value;
			                    }
			                 }
			                 var applyType = '<c:out value="${_LOGONUSER_.operatorInfoModel.operatorType}"/>';
			                 var operatorName = '<c:out value="${_LOGONUSER_.operatorInfoModel.loginName}"/>';
			                 var url = '<%=request.getContextPath()%>/manage/manualSettleLog/singleSettleApplyTaskAdd';
									$.post(
									       url,
										   {
												'manualSettleLogModel.settleType' : '1',
												'manualSettleLogModel.privateType' : privateType,
												'manualSettleLogModel.bankUsrname' : $("#bankUsrname").val(),
												'manualSettleLogModel.bankAccount' :  $("#bankAccount").val(),
												'manualSettleLogModel.depositBank' :  $("#depositBank").val(),
												'manualSettleLogModel.depositBankBranch' :  $("#depositBankBranch").val(),
												'manualSettleLogModel.transAmt' :  $("#transAmt").val(),
												'manualSettleLogModel.remark' :  $("#remark").val(),
												'todoTaskModel.taskType' : '4',//单笔结算
												'todoTaskModel.taskOperatorType' : '1',//新增
												//	1、	系统人员发起 2、	代理人发起
												'todoTaskModel.applyType':applyType,
												'todoTaskModel.applyOperator':operatorName,
												'todoTaskModel.approveStatus':'0'
											},
											function(data) {
												if (data.success) {
													$.messager
															.alert(
																	"提示信息",
																	data.msg,
																	"info",
																	function() {
																		window.location.href = window.location.href;
																	});
												} else {
													$.messager.alert(
															"提示信息",
															data.msg);
												}
											});
								}
							});
		}
	</script>
</HEAD>
<BODY>
	<DIV class="all">
		<%@ include file="/jsp/platform/include/head.jsp"%>
		<%@ include file="/jsp/platform/include/menu.jsp"%>
		<DIV class="mains">
			<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
				<TBODY>
					<TR valign="top">
						<%@ include file="/jsp/platform/include/mainLeft.jsp"%>
						<TD>
							<TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
								<TBODY>
									<TR>
										<TD>
											<TABLE width="180" border="0" cellspacing="0" cellpadding="0">
												<TBODY>
													<TR>
														<TD width="7"><IMG width="7" height="36" alt=""
															src="<%=request.getContextPath()%>/images/pages_l.jpg">
														</TD>
														<TD align="center"
															background="<%=request.getContextPath()%>/images/pages_bg.jpg">
															<SPAN class="f_tit1">单笔结算申请</SPAN></TD>
														<TD width="7"><IMG width="7" height="36" alt=""
															src="<%=request.getContextPath()%>/images/pages_r.jpg">
														</TD>
													</TR>
												</TBODY>
											</TABLE></TD>
									</TR>
								</TBODY>
								<TR>
									<TD>
										<div class="pages_con">
											<div class="pages_con_20">
												<FORM name="rechageForm" id="rechageForm"
													action="/buser/BTRANS/0100/1/doInCash" method="post">
													<DIV class="transaction_external">
														<DIV class="clearfix">
															<SPAN class="label cz_label"
																style="width:120px;text-align:right;">对公对私:</SPAN> <SPAN
																class="fund-item"> <INPUT name="privateType"
																type="radio" maxlength="60" checked value="0"> <SPAN
																	style="color: #333;">对私 </span> <INPUT name="privateType"
																	type="radio" maxlength="60"  value="1"> <SPAN
																		style="color: #333;">对公 </span>
															</SPAN>
														</DIV>
														<DIV class="clearfix">
															<SPAN class="label cz_label"
																style="width:120px;text-align:right;">开户名称:</SPAN> <SPAN
																class="fund-item"> <INPUT name="bankUsrname" id="bankUsrname"
																class="txtbox_cz txtbox_cz_long txtbox_cz_color input_change"
																type="text" maxlength="60">
															</SPAN>
														</DIV>
														<DIV class="clearfix">
															<SPAN class="label cz_label"
																style="width:120px;text-align:right;">开户银行账号:</SPAN> <SPAN
																class="fund-item"> <INPUT name="bankAccount" id="bankAccount"
																class="txtbox_cz txtbox_cz_long txtbox_cz_color input_change"
																type="text" maxlength="60">
															</SPAN>
														</DIV>
														<DIV class="clearfix">
															<SPAN class="label cz_label"
																style="width:120px;text-align:right;">开户银行:</SPAN> <select id="depositBank" name="settleCardInfoModel.depositBank">
														<option value="">请选择开户银行</option>
														<c:forEach var="list" items="${depositBankList}">
														<option value="${list.dirValue}"><c:out value='${list.dirCaption}'/></option>
														</c:forEach>
													</select>
														</DIV>
														<DIV class="clearfix">
															<SPAN class="label cz_label"
																style="width:120px;text-align:right;">开户银行支行:</SPAN> <SPAN
																class="fund-item"> <INPUT name="depositBankBranch" id="depositBankBranch"
																class="txtbox_cz txtbox_cz_long txtbox_cz_color input_change"
																type="text" maxlength="60">
															</SPAN>
														</DIV>
														<DIV class="clearfix">
															<SPAN class="label cz_label"
																style="width:120px;text-align:right;">付款金额(元):</SPAN> <SPAN
																class="fund-item"> <INPUT name="transAmt" id="transAmt"
																class="txtbox_cz txtbox_cz_long txtbox_cz_color input_change"
																type="text" maxlength="60">
															</SPAN>
														</DIV>
														<DIV class="clearfix">
															<SPAN class="label cz_label"
																style="width:120px;text-align:right;">备注:</SPAN> <SPAN
																class="label label_color"><INPUT name="remark" id="remark"
																class="txtbox_cz txtbox_cz_long txtbox_cz_color input_change"
																type="text" maxlength="60">
															</SPAN>
														</DIV>

														<DIV class="note">
															<SPAN class="label cz_label">&nbsp;</SPAN> <A
																class="btn confirm" href="javascript:void(0);"
																style="margin-left:113px;" onClick="singleSettleApplyTaskAdd()">确认</A>
														</DIV>
														<DIV class="clear">&nbsp;</DIV>
													</DIV>
												</FORM>
												<!--当中内容块结束-->
							</TABLE></TD>
					</TR>
				</TBODY>
			</TABLE>
		</DIV>
		<%@ include file="/jsp/platform/include/foot.jsp"%>
</BODY>
</HTML>
